//
//  HomeManager1.h
//  wsgz
//
//  Created by huck on 2017/5/7.
//  Copyright © 2017年 BoingPay. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EnumMacro.h"

// banner条
@interface BannerViewData : NSObject

@property (nonatomic, copy) NSString *image;                      // 图片
@property (nonatomic, copy) NSString *title;                     // 名称
@property (nonatomic, copy) NSString *linkUrl;                   // 链接地址

- (void)setInfo:(NSDictionary *)dic;

@end

// 水体信息(搜索)&任务tab
@interface WaterInfoData : NSObject

@property (nonatomic, copy) NSString *waterId;                   //水体id
@property (nonatomic, copy) NSString *waterName;                 //水体名称
@property (nonatomic, copy) NSString *waterLevelName;            //水体等级  "河道 小微水体
@property (nonatomic, copy) NSString *waterQualityClassName;     //水质等级  "III
@property (nonatomic, copy) NSString *dutyArea;                  //责任主体 '经济开发区'
@property (nonatomic, copy) NSString *waterLocation;             //水体位置
@property (nonatomic)       BOOL isDirect;                  //是否0直排(Y,N)


//任务页参数
@property (nonatomic, copy) NSString *taskId;        //(整改中的是巡查id,待巡查的是水体Id)
@property (nonatomic) TaskStatusType *taskStatus;   // (0.待巡查 1.整改中 2.已完成)
@property (nonatomic, copy) NSString *scoutTime;     //已完成 任务的巡查时间'

- (void)setInfo:(NSDictionary *)dic;

@end

@interface WaterInfoDetailData : NSObject

@property (nonatomic, copy) NSString *waterId;                   //水体id
@property (nonatomic, copy) NSString *waterName;                 //水体名称
@property (nonatomic, copy) NSString *waterLevelName;            //水体等级  "河道 小微水体
@property (nonatomic, copy) NSString *waterlength;                //水体长度
@property (nonatomic, copy) NSString *waterQualityClassName;     //水质等级  "III
@property (nonatomic, copy) NSString *dutyArea;                  //责任主体 '经济开发区'
@property (nonatomic, copy) NSString *waterStart;     //水体起点
@property (nonatomic, copy) NSString *waterEnd;       //水体终点
@property (nonatomic, copy) NSString *manager;       //治理人
@property (nonatomic, copy) NSString *superviseName;     //督导员
@property (nonatomic, copy) NSString *dutyName;                  //责任人
@property (nonatomic, copy) NSString *waterLocation;             //水体位置
@property (nonatomic, copy) NSString *waterLabel;             //水体位置在地图的标注"29.223+16.223",
@property (nonatomic) NSInteger mapLevel;             //地图缩放层级  默认16
@property (nonatomic, copy) NSString *mapTag;             //默认地图中心坐标,"29.223+16.223",
@property (nonatomic)       BOOL isDirect;                  //是否0直排(Y,N)
@property (nonatomic, strong) NSMutableArray *positionList;  //地图坐标集合[PositionInfoData]
@property (nonatomic, strong) NSMutableArray *badReasonAnalysis;  //原因分析(劣5类)
@property (nonatomic, strong) NSMutableArray *badManageScheme;  //治理方案（劣5类)BadReasonItemData
@property (nonatomic) BOOL showYDYC;             //是否显示一点一策 ==1一点一策 2无

- (void)setInfo:(NSDictionary *)dic;

@end


//地图坐标信息
@interface PositionInfoData : NSObject
@property (nonatomic, copy) NSString *position;        //标记坐标字符串
@property (nonatomic)       BOOL isDirect;             //是否0直排(Y,N)
@property (nonatomic, copy) NSString *dirtyName;       //排污口名称
@property (nonatomic, copy) NSString *dirtyPlace;      //排污口地址
@property (nonatomic, copy) NSString *dirtyType;       //水体范围、混排口、标排口、排污口
@property (nonatomic, copy) NSString *status;          //(00水体范围、01混排口、02、标排口 03排污口）(未定) //非00 的作为排污口显示,00的是用作地图划线的

- (void)setInfo:(NSDictionary *)dic;
@end

//tab页水体名称搜索列表的数据
@interface WaterDirtyData : NSObject
@property (nonatomic, copy) NSString *dirtyId;                   //标记id
@property (nonatomic, copy) NSString *waterId;                   //水体id
@property (nonatomic, copy) NSString *waterName;                 //水体名称
@property (nonatomic) NSInteger mapLevel;             //地图缩放层级 默认16
@property (nonatomic, copy) NSString *mapTag;             //默认地图中心坐标,"29.223+16.223",
@property (nonatomic, copy) NSString *waterLocation;             //水体位置
@property (nonatomic, copy) NSString *wTypeName;             //水质 01-06
@property (nonatomic, strong) PositionInfoData *position;  //坐标PositionInfoData

@property (nonatomic) NSInteger index;             //标注索引,00水体范围的才标记

- (void)setInfo:(NSDictionary *)dic;
@end

//一点一策具体类型和详细介绍
@interface BadReasonItemData : NSObject
@property (nonatomic, copy) NSString *value;    //编码 01 02
@property (nonatomic, copy) NSString *detail;   //下拉的详细描述
//附加参数
@property (nonatomic) BOOL showDetail;          //界面中是否显示下拉详情,默认NO不显示
- (void)setInfo:(NSDictionary *)dic labelKey:(NSString *)key;
@end

////排污口信息
//@interface OutWaterItemData : NSObject
//@property (nonatomic, copy) NSString *name;             //排污口名称
//@property (nonatomic, copy) NSString *type;             //排污口类型
//@property (nonatomic)       BOOL isDirect;              //是否0直排(Y,N)
//@property (nonatomic, copy) NSString *location;         //位置
//
//- (void)setInfo:(NSDictionary *)dic;
//@end

// 水体巡查列表 搜索数据
@interface WaterRecodeItemData : NSObject

@property (nonatomic, copy) NSString *recordId;             //巡查Id
@property (nonatomic, copy) NSString *waterName;            //水体名称
@property (nonatomic, copy) NSString *superviseName;        //督导员
@property (nonatomic, copy) NSString *supervisePropose;     //督导意见
@property (nonatomic, copy) NSString *scoutName;            //巡查人
@property (nonatomic, copy) NSString *scoutTime;            //巡查时间
@property (nonatomic, copy) NSString *managerName;          //整改人
@property (nonatomic)       ScoutStatus scoutStatus;          //巡查状态 0,1,2等待整改 整改中 整改完成
@property (nonatomic, copy) NSString *manageOpinion;          //反馈意见

@property (nonatomic, copy) NSString *inspectPic;          //巡查图片(此处为图片路径)
@property (nonatomic, strong) NSMutableArray *manageFinishUrls;  //整改完成时上传的图片集
@property (nonatomic, strong) NSMutableArray *inspectingUrls;  //巡查时上传的图片集[{@"picUrl": @"picId":}]
@property (nonatomic)       InspectResultType resultType;          //巡查结果(0合格，1不合格)
@property (nonatomic, strong) NSMutableArray *badReasonAnalysis;  //原因分析(劣5类)
@property (nonatomic, strong) NSMutableArray *badManageScheme;  //治理方案（劣5类)BadReasonItemData
@property (nonatomic) BOOL showYDYC;             //是否显示一点一策 ==1一点一策 2无

- (void)setInfo:(NSDictionary *)dic;

//整改状态文字
-(NSString *)getScoutStatusStr;

@end


// 项目搜索信息
@interface ProjectInfoData : NSObject

@property (nonatomic, copy) NSString *projectId;      //名称
@property (nonatomic, copy) NSString *projectName;      //名称
@property (nonatomic, copy) NSString *projectTypeName;  //工程类别
@property (nonatomic, copy) NSString *planInvest;      //计划投资
@property (nonatomic, copy) NSString *startTime;        //启动时间
@property (nonatomic, copy) NSString *leader;           //负责人
@property (nonatomic, copy) NSString *topLeader;        //责任领导人
@property (nonatomic, copy) NSString *tempo;        //项目总进度
@property (nonatomic, copy) NSString *renovateName;       //整改项
@property (nonatomic, copy) NSString *finishTime;       //完成时间
@property (nonatomic, strong) NSMutableArray *processList;     //进度列表[ProjectProcessData]
@property (nonatomic, copy) NSString *dutyArea;       //所在区域
@property (nonatomic, strong) NSMutableArray *projectFileList;     //文件列表[ProjectFileData]

- (void)setInfo:(NSDictionary *)dic;

@end

//项目进度
@interface ProjectProcessData : NSObject
@property (nonatomic, copy) NSString *processId;        //id
@property (nonatomic) NSInteger percent;            //进度百分数 0-100
@property (nonatomic, copy) NSString *detail;        //描述
@property (nonatomic, copy) NSString *finishTime;    //

- (void)setInfo:(NSDictionary *)dic;

@end

//文件信息
@interface ProjectFileData : NSObject
@property (nonatomic, copy) NSString *fileName;        //
@property (nonatomic, copy) NSString *realpath;        //地址
//附加值
@property (nonatomic, copy) NSString *exeName;        //后缀名
@property (nonatomic) NSInteger typeIndex;        //文件类型的索引,排序用
@property (nonatomic) CGFloat  showHeight;          //文件展示的总高度,展示前再计算

- (void)setInfo:(NSDictionary *)dic;

-(BOOL) isPicture;

//扩展名对应的图片对应
-(NSString *) getIconName;

@end


//系统信息数据模型
@interface SystemInfoData : NSObject

@property (nonatomic, copy) NSString *systemId;        //id
@property (nonatomic, copy) NSString *systemValue;     //值
@property (nonatomic, copy) NSString *systemLabel;     //描述

- (void)setInfo:(NSDictionary *)dict;
@end

//区域数据模型
@interface RegionInfoData : NSObject

@property (nonatomic, copy) NSString *regionId;        //id "A04A01A18"
@property (nonatomic, copy) NSString *regionName;     //值 "陆家"
@property (nonatomic, strong) NSMutableArray *subRegionList;   //次级村落 [RegionInfoData]

- (void)setInfo:(NSDictionary *)dict;
@end


//******************    HomeManager**********************///
@interface HomeManager : NSObject

@property (nonatomic, strong) NSMutableArray *projectInfoList;   // 项目搜索信息"
@property (nonatomic, strong) NSMutableArray *waterInfoList;   // 水体搜索信息"
@property (nonatomic, strong) NSMutableArray *bannerViewList;   // banner

@property (nonatomic, strong) NSMutableArray *waterClassList;   // 水体等级:"河道" "小微水体"
@property (nonatomic, strong) NSMutableArray *maschemeList;   // 整改方案:"截污纳管工程""清淤保洁工程""排口整改工程""生态引水与修复工程""科技治水工程"
@property (nonatomic, strong) NSMutableArray *waterQualiList;   // 水质等级:I "III""II"
@property (nonatomic, strong) NSMutableArray *reanalysisList;   // 原因分析:农村生活污水污染""工业企业废水污染""生活垃圾或建筑垃圾等"
@property (nonatomic, strong) NSMutableArray *proManageList;   // 项目中的整改项::"剿劣""污水直排"
@property (nonatomic, strong) NSMutableArray *proSortList;   // 项目中的工程类别:"截污纳管工程""清淤保洁工程""排口整改工程""生态引水与修复工程""科技治水工程" //tab页右上角数据

@property (nonatomic, strong) NSMutableArray *regionList;   //区域信息
@property (nonatomic, strong) ProjectInfoData *projectDetailInfo;   //项目的单个详情
@property (nonatomic, strong) WaterInfoDetailData *waterDetailInfo;   //项目的单个详情
@property (nonatomic, strong) NSMutableArray *undoneTaskList;   // 待办任务列表
@property (nonatomic, strong) NSMutableArray *doneTaskList;   // 已办任务列表
@property (nonatomic, strong) NSMutableArray *waterRecordList;   // 水体巡查记录
@property (nonatomic, strong) WaterRecodeItemData *waterRecordDetail;   //单个巡查记录的详情
@property (nonatomic, strong) NSMutableArray *waterDirtyList;   //tab页水体搜索结果
@property (nonatomic, strong) NSMutableArray *waterMapList;   //tab页水体map区域搜索结果


+ (instancetype)sharedInstance;

//原因分析:农村生活污水污染""工业企业废水污染""生活垃圾或建筑垃圾等" 获取具体标签
-(NSString *)getReanalysisLabel:(NSString *)value;

//整改方案:"截污纳管工程""清淤保洁工程""排口整改工程""生态引水与修复工程""科技治水工程" 获取具体标签
-(NSString *)getMaschemeLabel:(NSString *)value;


// 请求系统的app信息
//@"waterClass",@"waterQuali",@"reanalysis",@"mascheme",@"proSort",@"proManage"
- (void)requestAppSystemInfo:(NSString *)code complete:(void (^)(BOOL success))complete;

//请求乡镇信息
- (void)requestRegionInfo:(void (^)(BOOL success))complete;

//请求水体搜搜信息
- (void)requestSearchWater:(NSString *)wName wLevelId:(NSString *)wLevelId regionId:(NSString *)regionId wquestion:(NSString *)wquestion page:(NSInteger)pageNo reset:(BOOL)reset complete:(void (^)(BOOL success,BOOL hasMore))complete;

//请求水体详情信息
- (void)requestWaterDetail:(NSString *)waterId complete:(void (^)(BOOL success))complete;


//请求搜索项目
- (void)requestSearchProject:(NSString *)projectName typeId:(NSString *)projectTypeId page:(NSInteger)pageNo reset:(BOOL)reset complete:(void (^)(BOOL success,BOOL hasMore))complete;

//请求单个项目详情
- (void)requestProjectDetail:(NSString *)projectId complete:(void (^)(BOOL success))complete;


//请求单个项目详情
- (void)requestTaskList:(TaskType)taskType reset:(BOOL)reset page:(NSInteger)pageNo complete:(void (^)(BOOL success,BOOL hasMore))complete;

//请求水体巡查记录列表
- (void)requestSearchWaterRecodeList:(NSString *)dateTime waterId:(NSString *)waterId page:(NSInteger)pageNo reset:(BOOL)reset complete:(void (^)(BOOL success,BOOL hasMore))complete;

//请求水体巡查记录详情
- (void)requestWaterRecodeDetail:(NSString *)recordId complete:(void (^)(BOOL success))complete;

//上传图片
- (void)requestUploadImages:(NSArray *)imgs flag:(NSString *)flagStr completion:(void(^)(BOOL success, NSArray *fileArr))completion;

//新增巡查或整治理-taskId 巡查是水体id 整治是巡查id text督导或者整治意见
- (void)requestAddRecoreOrDeal:(NSString *) taskId type:(BOOL)isAdd text:(NSString *)text fieldIds:(NSArray *)fieldIds completion:(void(^)(BOOL success))completion;

//请求tab页的水体
- (void)requestWaterDirtyList:(NSString *)waterName complete:(void (^)(BOOL success))complete;

//请求tab页 我所在位置附近的水体 (矩形搜索)
- (void)requestRectWaterDirtyList:(NSArray *)positions complete:(void (^)(BOOL success))complete;



@end
